# -*- coding: utf-8 -*-

"""
@author: Laowang
@contact: QQ:1125564921
@Created on: 2022/6/21
@Remark: 
"""

from framework_strategy.gopy.gateways.cache import overloadcls
from framework_strategy.gopy.gateways.settings import XT4APISETTING
# XT 平台


@overloadcls
class XT4PlatConfig:

    Domain = {
        "pro": XT4APISETTING.API_DOMAIN_PRO,
        "dev": XT4APISETTING.API_DOMAIN_DEV,
        "test": XT4APISETTING.API_DOMAIN_TEST,
    }

    # Get timestamp from server
    GET_SERVER = '/v4/public/time'

    # Get trade account type
    GET_ACCOUNT = '/trade/api/v1/getAccounts'

    # Get trade config from market
    GET_MARKET_CONFIG = '/v4/public/symbol' 

    # Get Kline
    GET_KLINE = '/v4/public/kline'

    # Access to 24 hours of trading
    GET_TICKER = '/v4/public/ticker/full' 

    # Obtain all trading quotations within 24 hours
    GET_TICKERS = '/v4/public/ticker/24h' 

    # Get the latest trading depth
    GET_DEPTH = '/v4/public/depth'

    # Get the latest transaction data
    GET_TRADES = '/v4/public/trade/recent'

    # Get balance of account
    GET_BALANCE = '/v4/balances' 

    # Gets the specified account assets
    GET_FUNDS = '/v4/balances'

    # Place a order and Commissioned order
    SEND_ORDER = '/v4/order'

    # Batch order
    BATCH_ORDER = '/v4/batch-order' 

    # Cancel order
    CANCEL_ORDER = '/v4/order' 

    # Batch cancel
    BATCH_CANCEL = '/v4/batch-order'

    # OrderLine
    GET_ORDER = '/v4/order' 

    # Obtain outstanding orders
    GET_OPEN_ORDERS = '/v4/open-order'

    # Cancell batch order
    DELETE_OPEN_ORDERS = "/v4/open-order" # 1

    # 
    GET_ACCOUNT_HISTORY_ORDER = "/v4/history-order" # 1

    # Get multiple order information
    GET_BATCH_ORDERS = '/v4/batch-order'

    # Get myTrades
    GET_ACCOUNT_TRADES = "/v4/trade"
